<extend name="Public/base"/>
<block name="nav"> <include file="nav"/> </block>
<block name="body">
  <form class="well form-inline " method="get" action="{:U("")}">
    <div class="form-group">
      <input type="text" class="input-medium" name="keyword"  value="{$keyword}" placeholder="请输入关键字...">

    </div>
    <div class="form-group">
      <button class="btn btn-xs btn-info" data-toggle="tooltip" title="搜索"> <i class="icon-search bigger-110"></i> </button>
      <if condition="$keyword"> <a  data-toggle="tooltip" title="清除搜索项"  href="{:U(index)}" class="tooltip-danger btn btn-xs btn-danger"><i class="icon-remove bigger-110"></i></a></if>
    </div>
  </form>
  <form class="J_ajaxForm" action="{:U('listorders')}" method="post">
    <div class="table_list">
      <table class="table table-striped table-bordered table-hover" >
        <thead>
          <tr>
            <th width="30" class="hidden-480"><label>
                <input type="checkbox" class="check-all">
              </label></th>
   
            <th width="50" >ID</th>
            <th>资源名称</th>
            <th>类型</th>
            <th class="hidden-480">关键词</th>

            <th>管理操作</th>
          </tr>
        </thead>
        <tbody>
          <volist name="_list" id="vo">
            <tr>
              <td class="hidden-480"><input type="checkbox" class="ids"  name="ids[]" value="{$vo.id}" ></td>
             
              <td>{$vo.id}</td>
              <td >{$vo.name}</td>
              <td >

                <switch name="vo.type">

                  <case value="wenzi">文字</case>
                  <case value="img">图片</case>
                  <case value="tuwen">图文</case>



                </switch>


              </td>
              <td class="hidden-480"><php>echo substr($vo[key],1,-1)</php>


              </td>
   
              <td> <a data-toggle="tooltip" title="" class="btn btn-xs btn-info tooltip-info" href="{:U('edit',array('id'=>$vo['id']))}" data-original-title="修改"><i class="icon-edit bigger-120"></i></a>
               <if condition="UID eq '1'">
              <a data-toggle="tooltip" title="" class="ajax-del btn btn-xs btn-danger	tooltip-danger" href="{:U('delete',array('id'=>$vo['id']))}" data-original-title="删除"><i class="icon-trash bigger-120"></i></a>
              </if>
              </td>
            </tr>
          </volist>
        </tbody>
      </table>
    </div>
    <div class="pagination">{$Page}</div>
    <div class="form-actions">


      <button class="btn ajax-post confirm btn-danger mr10" data-subcheck="true" type="submit" url="{:U('delete')}" target-form="J_ajaxForm"   data-title="你确定删除吗？">删除</button>
      <a class="btn btn-return" href="__URL__" >返 回</a>
    </div>
  </form>
</block>

